package com.changli07._interface;

public class InterfaceTest {
    public static void main(String[] args) {
        System.out.println(flyable.MAX_SPEED);
        System.out.println(flyable.MIN_SPEED);
        bullet b1 = new bullet();
        b1.fly();
        b1.attack();
    }
}
interface flyable{
    public static final int MAX_SPEED = 7900;
    //默认 自带 public static final 的全局变量声明
     int MIN_SPEED = 0;


     //方法的声明
//    public abstract 也可以省略不写
    public abstract void fly();
}
interface attackable {
    void attack ();
}
abstract class Plane implements flyable {

}
class bullet implements attackable,flyable {

    @Override
    public void attack() {
        System.out.println("子弹杀伤力很大");
    }

    @Override
    public void fly() {
        System.out.println("让子弹飞一会");
    }
}
